<template>
  <div>
    <wapHeader></wapHeader>
    <div class="wapmain">
      <h1>{{$t('vr.personalinforTitle')}}</h1>
      <ul class="infoUl">
        <li @click="gopath('/wap/info')">
          <img class="imgs" src="../../../../assets/wapimgs/people.png" alt />
          <span>{{$t('vr.personalinfor')}}</span>
          <img class="ico" src="../../../../assets/wapimgs/jian.png" alt />
        </li>
        <li @click="gopath('/wap/collection')">
          <img class="imgs" src="../../../../assets/wapimgs/xin.png" alt />
          <span>{{$t('vr.mycollection')}}</span>
          <img class="ico" src="../../../../assets/wapimgs/jian.png" alt />
        </li>
        <li @click="gopath('/wap/password')">
          <img class="imgs" src="../../../../assets/wapimgs/pass.png" alt />
          <span>{{$t('vr.accoandpass')}}</span>
          <img class="ico" src="../../../../assets/wapimgs/jian.png" alt />
        </li>
        <li @click="gopath('/wap/aboutus')">
          <img class="imgs" src="../../../../assets/wapimgs/logo.png" alt />
          <span>{{$t('vr.aboutus')}}</span>
          <img class="ico" src="../../../../assets/wapimgs/jian.png" alt />
        </li>
      </ul>
      <button class="btn" @click="logOut">{{$t('vr.logout')}}</button>
    </div>
  </div>
</template>

<script>
import api from "servicePath/index";
import wapHeader from "../common/back.vue";
import { mapState, mapMutations } from "vuex";
export default {
  components: {
    wapHeader
  },
  data() {
    return {};
  },
  computed: {
    ...mapState(["lang"])
  },
  mounted() {},
  methods: {
    ...mapMutations(["saveloginInfo"]),
    gopath(path) {
      let r = "/foundation";
      if (this.$route.path.indexOf("/fakuma") >= 0) {
        r = "/fakuma";
      }
      this.$router.push(r + path);
    },
    logOut() {
      // 退出
      sessionStorage.removeItem("loginInfo");
      sessionStorage.removeItem("vrToken");
      this.saveloginInfo("");
      this.$message({
        message:
          this.lang == "en"
            ? "Exit succeeded"
            : this.lang == "de"
            ? "Beenden erfolgreich"
            : "退出成功",
        type: "success"
      });
      this.$router.push({
        path: "home"
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.wapmain {
  width: 80%;
  margin: 0 auto;
  h1 {
    font-weight: normal;
    margin: 0 0 80px 0;
  }
  .infoUl {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    flex-wrap: wrap;
    li {
      width: 100%;
      background: #fff;
      border-radius: 10px;
      border: none;
      -moz-box-shadow: 1px 1px 14px 5px #f0f0f0;
      -webkit-box-shadow: 1px 1px 14px 5px #f0f0f0;
      box-shadow: 1px 1px 14px 5px #f0f0f0;
      padding: 10px 15px;
      margin-bottom: 30px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      position: relative;
      span {
        font-size: 16px;
      }
      .imgs {
        margin-right: 10px;
      }
      .ico {
        width: 6%;
        position: absolute;
        right: 5%;
        top: 35%;
      }
    }
  }
  .btn {
    background: linear-gradient(to right, #ff7f41, #e6007e);
    width: 100%;
    padding: 15px;
    font-size: 14px;
    color: #fff;
    text-align: center;
    border: none;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    margin-top: 30px;
  }
}
</style>